<template>
	<view>
		<uni-navbar :title="'订单列表'"></uni-navbar>
		<view class="o-header">
			<view class="h-1" @click="show = true">
				全部<image src="../../../static/application/xiala.png" mode=""></image>
			</view>
			<view class="h-2">465646.1元</view>
		</view>

		<view class="block" v-for="(item,index) in 3" :key="index">
			<view class="b-1">
				<view>南京儿牙</view>
				<view>未确认</view>
			</view>
			<view class="b-2">
				客户信息：李四132566447447 <image @click="copy('客户信息')" src="../../../static/application/copy.png" mode="">
				</image>
			</view>
			<view class="b-2">
				订单号：CRM32143544434387345343 <image @click="copy('订单号')" src="../../../static/application/copy.png"
					mode=""></image>
			</view>
			<view class="b-2">
				缴费时间：2022-08-23 11:46
			</view>
			<view class="b-2 color">
				缴费方式：线上支付
			</view>
			<view class="b-2">
				缴费金额：1002元
			</view>
		</view>

		<!-- 筛选 -->
		<u-popup v-model="show" mode="bottom">
			<view class="pop-block">
				<u-form :model="form" label-width="180" :border-bottom="false" label-position="top">
					<u-form-item label="选择业绩状态" :border-bottom="false">
						<view class="p-status">
							<view @click="lingIndex = 0" :class="lingIndex == 0 ? 'bg-color1' : 'bg-color'">全部</view>
							<view @click="lingIndex = 1" :class="lingIndex == 1 ? 'bg-color1' : 'bg-color'">未领取</view>
							<view @click="lingIndex = 2" :class="lingIndex == 2 ? 'bg-color1' : 'bg-color'">已领取</view>
						</view>
					</u-form-item>
					<u-form-item label="自定义时间" :border-bottom="false">
						<view class="f-time">
							<view class="start-time">
								<u-input border input-align="center" v-model="form.startTime" disabled @click="startShow = true"
									placeholder="开始时间" />
							</view>
							<view class="start-">至</view>
							<view class="stop-time">
								<u-input border input-align="center" v-model="form.stopTime" disabled @click="stopShow = true"
									placeholder="结束时间" />
							</view>
						</view>
					</u-form-item>
				</u-form>

			</view>
			<view class="p-bottom">
				<view>重置</view>
				<view>确认</view>
			</view>
		</u-popup>
		<!-- 开始时间 -->
		<u-picker mode="time" v-model="startShow"></u-picker>
		<!-- 结束时间 -->
		<u-picker mode="time" v-model="stopShow"></u-picker>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				form: {
					startTime: '',
					stopTime: ''
				},
				startShow: false,
				stopShow: false,
				lingIndex: 0
			};
		},
		methods: {
			copy(data) {
				uni.setClipboardData({
					data: data,
					success(res) {
						uni.showToast({
							icon: 'none',
							title: '复制成功'
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.o-header {
		font-size: 26rpx;
		font-family: Source Han Sans SC;
		font-weight: 600;
		color: #4D4D4D;
		display: flex;
		justify-content: space-between;
		background-color: #fff;
		padding: 30rpx;
		border-bottom: 1rpx solid #d1d1d1;

		.h-1 {
			image {
				width: 24rpx;
				height: 24rpx;
				margin-left: 10rpx;
			}
		}
	}

	.block {
		background-color: #fff;
		padding: 30rpx;
		font-size: 24px;
		color: #999999;
		border-bottom: 1rpx solid #e6e6e6;

		.b-1 {
			display: flex;
			justify-content: space-between;

			view:nth-child(1) {
				font-size: 28rpx;
				font-family: Source Han Sans SC;
				font-weight: 600;
				color: #4D4D4D;
			}

			view:nth-child(2) {
				width: 88rpx;
				height: 30rpx;
				background: #FCECD5;
				border-radius: 13rpx;
				font-size: 20rpx;
				font-family: Source Han Sans SC;
				font-weight: 400;
				color: #FD9427;
				text-align: center;
			}
		}

		.b-2 {
			font-size: 24rpx;
			line-height: 60rpx;

			image {
				width: 24rpx;
				height: 24rpx;
				margin-left: 10rpx;
			}
		}

		.color {
			color: #E02D38;
		}
	}

	.pop-block {
		padding: 20rpx 30rpx;
	}

	.f-time {
		display: flex;
		justify-content: space-between;

		.start- {
			padding: 0 20rpx;
		}
	}

	.p-bottom {
		display: flex;
		text-align: center;
		line-height: 80rpx;

		view:nth-child(1) {
			width: 50%;
			height: 80rpx;
			background-color: #e7e7e7;
		}

		view:nth-child(2) {
			width: 50%;
			height: 80rpx;
			background-color: #1e5ff5;
			color: #fff;
		}
	}
	
	.p-status{
		display: flex;
		justify-items: flex-start;
		view{
			width: 115rpx;
			height: 54rpx;
			background: #409EFE;
			border-radius: 8rpx;
			text-align: center;
			line-height: 54rpx;
			margin-right: 20rpx;
		}
		
		.bg-color{
			background-color: #F2F2F2;
			color: #999999;
		}
		
		.bg-color1{
			background-color: #409EFE;
			color: #FFFFFF;
		}
	}
</style>
